<%namespace YouHP.Model%>
<%namespace YouHP.Model.Group%>
<%namespace YouHP.Utility%>
<%namespace YouHP.BLL%>
<%template _header%>
<!--<script type="text/javascript" src="/support/common/common.js"></script>-->
<script type="text/javascript" src="/support/alpha/Js/mootools.js"></script>
<!--<script type="text/javascript" src="/support/swfobject/open-flash-chart.js"></script>-->

<style>
   .updateEmotionBtn
    {
        background-color:#99CC33;
        border-color:#CCFF99 rgb(102, 153, 0) rgb(102, 153, 0) rgb(204, 255, 153);
        border-style:solid;
        border-width:1px;
        color:#FFFFFF;
        font-size:12px;
        height:20px;
        padding:1px;
        text-align:center;
    }
</style>

 <script type="text/javascript">

function toggleEmotionInput()
{
    var e = _$('EmotionInputDiv').style.display;
    if (e == 'none')
    {
        _$('EmotionInputDiv').style.display = 'block';
        //_$('UpdateEmotionBtnDiv').style.display='none';
        _$('EmotionDisplayDiv').style.color = '#aaaaaa';
    }
    else
    {
        _$('EmotionInputDiv').style.display = 'none';
       // _$('UpdateEmotionBtnDiv').style.display='block';
        _$('EmotionDisplayDiv').style.color = '#EB1539';
    }
}

function enterUpdateEmotionInput(obj)
{
    obj.style.color = '#000000';
    if (obj.value == obj.defaultValue)
        obj.value = '';
    obj.style.borderColor = '#AAAAAA';
}

function UpdateEmotion()
{
    var statusDescription = $('EmotionInput').value;
    if (statusDescription == ""||statusDescription ==$('EmotionInput').defaultValue)
        statusDescription = "没什么好说的...";
    
    var emotionTypeIndex = 0;
    var form = _$('emotionTypeSelection');
    for(var i = 0;i < form.elements.length;i++)
    {
      var e = form.elements[i];
      if(e.name == "emotiontype")
      {
         if(e.checked == true)
         {
             emotionTypeIndex = e.value;
             break;
         }
      }
    }   // for
    
    if (statusDescription.length > 50)
    {
        alert("心情描述不能超过50个字!");
        return;
    }
    
    _$('SubmitEmotionBtn').value = "正在处理...";
    
    var aurl = "/Pages/alpha/Ajax/EmotionUpdateAjax.aspx?statusdesc="+statusDescription.escUrl()+"&emotiontypeidx="+emotionTypeIndex;
    var myAjax=new Ajax(aurl,
    {
         method:'post',
         onComplete:function()
         {
              
                  var html=this.response.text;    
                  _$("EmotionDisplayDiv").innerHTML=html;
                  _$("SubmitEmotionBtn").value = "提交";
                  toggleEmotionInput();
          }
    }
   );
   myAjax.request();
}   // UpdateEmotion

</script>

<div class="layout-cols2">
<div class="col1">

  <%csharp%>TempUrl = ModuleCtrl.Header4("mybaseInfo","消息中心",false,false); <%/csharp%>
{TempUrl}
 <div class="newscenterdiv">
    <div  class="newscenterdiv_left">
            <img src="{_User.Avatar}" style="border:1px solid #CACACA; width:80px; height:80px;"/>
            <%csharp%>
                TempUrl = "/User/Avatar.aspx"; 
                string sNowDate=DateTime.Today.ToString("d");
            <%/csharp%>
            <div style="margin-top:5px;"><a href="{GetUrl(TempUrl)}"><font style="color:Green;">更换头像</font></a></div>
     </div>
          
     <div class="newscenterdiv_right">     
        <div class="emotiondiv"> 
            <div style="float:left; font-size:15px;"><font style="font-weight:bold;">{_User.UserName}</font>&nbsp;<span id="EmotionDisplayDiv"><img src="{EmotionImgURL}" style="width:30px; height:30px" /><font color="red">{EmotionDescriptionStr}</font></span></div>
 
            <div style="float:right; margin-top:10px;">
             <input name="UpdateEmotionBtn" id="UpdateEmotionBtn" class="updateEmotionBtn" type="button" value="更新心情" onclick="toggleEmotionInput()" />
            </div>
           <div style="clear:both;"></div>
           <div id="EmotionInputDiv" class="EmotionInputDiv" style="display:none;">
                                    <!-- 表情列表 -->
                                    <form id="emotionTypeSelection" name="emotionTypeSelection">
                                    <table>
                                        <tr>
                                            <%csharp%> for (int i=0; i < allEmotionTypes.Count; i ++) { <%/csharp%>
                                            <td width="80">
                                                <table>
                                                    <tr height="35"><td align="center"><img src="{allEmotionTypes[i].Img}"/></td></tr>
                                                    <tr height="20"><td align="center"><span>{allEmotionTypes[i].Name}</span></td></tr>
                                                    <tr height="20"><td align="center"> <input type="radio" class="radio" id="emotiontypeid{i}" name="emotiontype" value="{i}" /></td></tr>
                                                </table>
                                            </td>
                                            <%csharp%> } <%/csharp%>
                                        </tr>
                                    </table>
                                </form>
                                <script type="text/javascript">
                                    _$('emotiontypeid0').checked = true;
                                </script>
                                
                                <input name="EmotionInput" style="padding-left:2px; color:rgb(170, 170, 170); width: 450px; height:50px; border:1px solid;" value="随便说上两句..." onfocus="enterUpdateEmotionInput(this);"/>
                                <div style="text-align:center;">
                                <input name="SubmitEmotionBtn" class="updateEmotionBtn" type="button" value="提交" onclick="UpdateEmotion();"/>
                                <input name="CancelUpdateEmotionBtn" class="updateEmotionBtn" type="button" value="取消" onclick="toggleEmotionInput();"/>
                                </div>
             </div>
        </div> 

        <style>
            .mynews td
            {
            	padding:5px;
            }
        </style>
        <div style="border-bottom:1px solid #E1E4E6;">           
            <table class="mynews">
            <tr>
                <td>
                    站内消息：
                 </td>
                 <td align="right">
                    <%csharp%>TempUrl = "/User/PmInbox.aspx";<%/csharp%>
                    <a href="{this.GetUrl(TempUrl)}"  style="color:#808080;"><font color="red">{msgList[0].count}</font>条新</a>
                </td>
                <td>
                    病情系统留言：
                 </td>
                 <td align="right">
                    <%csharp%>TempUrl = "/Profile/DiseaseSystem.aspx?uid="+UserData.Id;<%/csharp%>
                    <a href="{this.GetUrl(TempUrl)}"  style="color:#808080;"><font color="red">{msgList[1].count}</font>条新</a>
                </td>
                <td>
                    日志评论：
                 </td>
                 <td align="right">
                    <%csharp%>TempUrl = "/User/NewLogCommentList.aspx";<%/csharp%>
                    <a href="{this.GetUrl(TempUrl)}" style="color:#808080;"><font color="red">{msgList[5].count}</font>条新</a>
                </td>
                <td>
                    病友互动：
                 </td>
                 <td align="right">
                    <%csharp%>TempUrl = "/User/ActionList.aspx?uid="+UserData.Id;<%/csharp%>
                    <a href="{this.GetUrl(TempUrl)}"  style="color:#808080;"><font color="red">{msgList[3].count}</font>条新</a>
                </td>
            </tr>
            <tr>
                <td>
                    好友申请：
                 </td>
                 <td align="right">
                    <%csharp%>TempUrl = "/User/FriendApplyList.aspx";<%/csharp%>
                    <a href="{this.GetUrl(TempUrl)}"  style="color:#808080;"><font color="red">{msgList[4].count}</font>条新</a>
                </td>
                  <td>
                    病情系统留言回复：
                 </td>
                 <td align="right">
                    <%csharp%>TempUrl="/User/CommentReplyList.aspx?uid="+UserData.Id;<%/csharp%>
                    <a href="{this.GetUrl(TempUrl)}" style="color:#808080;"><font color="red">{msgList[2].count}</font>条新</a>
                </td>
                <td>
                    日志评论回复：
                 </td>
                 <td align="right">
                    <%csharp%>TempUrl = "/User/NewLogCommentReplyList.aspx";<%/csharp%>
                    <a href="{this.GetUrl(TempUrl)}"  style="color:#808080;"><font color="red">{msgList[6].count}</font>条新</a>
                </td>

            </tr>
        </table>
        </div>
      <%csharp%>TempUrl = "/Profile/Index.aspx?uid="+UserData.Id;<%/csharp%>
       <div style="text-align:right;"><a href="{this.GetUrl(TempUrl)}" target="_blank"><font style="font-weight:bold; color:Green; ">>>别人眼中的我</font></a></div>
   
    </div>    
    <div style="clear:both;"></div>   
</div>
<!--消息中心部分结束-->

<%csharp%>TempUrl = ModuleCtrl.Footer("mybaseInfo"); <%/csharp%>
{TempUrl}

<%if overallCount<1%>
<%csharp%>TempUrl = ModuleCtrl.Header4("mybasicInfo","我的信息完整度",false,false);
    <%/csharp%>
    {TempUrl}     
    <div class="diseaseInfo" id="UserProfilerIntegrity">
        <table class="forumInfo">
            <tr>
                <td style="width: 340px; color: Green; font-size: 12; vertical-align: top; margin-top: 30px">
                    <strong>真实完整的病情档案，有益于得到更多更精确的帮助</strong>
                    <br />
                    <br />
                    <div style="position: relative; border: 1px #CCC solid; height: 8px; width: 300px;
                        margin: 0 auto; padding: 1px">
                        <div style="background: Red; height: 8px; " id="percentBar">
                        </div>
                        <div style="position: absolute; width: 300px; top: 18px; text-align: left; padding-bottom:5px; overflow: hidden; padding-top:10px; padding-right:20px;">
                        
                            你的病情信息完整度为<span id="overallSpan">{overallPercentage}</span></div>  
                    </div>
                    <span id="hiddenwidth" style=" display:none">{barLength}</span>
                    <span id="overallcountspan" style="display:none">{overallCount}</span>
                </td>
                <td style=" border-left:rgb(225,228,230) 1px solid; padding-left:30px">
                <ul style="list-style-image:url(/support/alpha/images/plus_icon.jpg); vertical-align:bottom">
                    <li><a href="/Pages/Alpha/User/BasicInfo.aspx"><font color="Green"></font>基本信息</a><%if {basicCount/3}<1%><span
                        id="basicSpan">（{basicPercentage}）</span><%else%><span style="color:Green">{fullIntegrityIcon}</span><%/if%></li>
                    <li><a href="/Pages/Alpha/DiseaseHistory/Index.aspx"><font color="Green"></font>疾病记录</a><%if {diseaseCount/3}<1%><span
                        id="diseaseSpan">（{diseasePercentage}）</span><%else%><span style="color:Green">{fullIntegrityIcon}</span><%/if%></li>
                    <li><a href="/Pages/Alpha/SymptomHistory/Index.aspx"><font color="Green"></font>症状记录</a><%if {symtomCount}<1%><span
                        id="symtomSpan">（{symtomPercentage}）</span><%else%><span style="color:Green">{fullIntegrityIcon}</span><%/if%></li>
                    <li><a href="/Pages/Alpha/TreatmentHistory/Index.aspx"><font color="Green"></font>治疗记录</a><%if {treatmentCount}<1%><span
                        id="treatmentSpan">（{treatmentPercentage}）</span><%else%><span style="color:Green">{fullIntegrityIcon}</span><%/if%></li>
                    <li><a href="/Pages/Alpha/IndicatorHistory/Index.aspx"><font color="Green"></font>指标记录</a><%if {indicatorCount}<1%><span
                        id="indicatorSpan">（{indicatorPercentage}）</span><%else%><span style="color:Green">{fullIntegrityIcon}</span><%/if%></li>
                </ul>
                </td>
            </tr>
        </table>
    </div>
    <%csharp%>TempUrl = ModuleCtrl.Footer("mybasicInfo"); <%/csharp%>
{TempUrl}  
<%/if%>
    

  <div id="friendaction" class="module">
      <div id="friendaction_top" class="corners crnr-cobalt">
        <div class="cornert"><div></div></div>
             <div onclick="tap_switch(this);" class="tap_current_style" id="tab_default">同类病人动态</div>
             <div onclick="tap_switch(this);" class="tap_style">我的病友动态</div>
             
     </div>
<div id="" class="mid">
<div class="m_l">
  <div class=m_r id="friendaction_content" >

  <div class="friendaction" id="FriendActionList" style="display:none;"></div>
  <div class="friendaction" id="PatientsLikeMeActionList">
     <div style="padding:20px 50px;">
        <%csharp%> TempUrl = "/images/indicator_medium.gif";<%/csharp%>
        <img src="{this.GetResource(TempUrl)}" /><b>正在加载……</b>        
    </div>
   </div>
</div>  
</div>
 </div>
  <div id="friendaction_bottom" class="bottom">
 <div class="b_l"></div>
<div class="b_r"></div> 
 </div>
 </div>

<style>
.tap_current_style
{

	background-color:#FFF;
	width:100px;
	height:22px;
	text-align:center;
   font-size:14px;
	color:Blue;
	 margin-left:10px;
	 margin-right:5px;
	 float:left;
	  font-weight:600;
	  cursor:pointer;
}
.tap_style
{
	cursor:pointer;
	width:100px;
	float:left;
	 margin-left:10px;
	 font-size:14px;
	 color:#FFFFFF;
	 font-weight:600;
	 margin-right:5px;
}

</style>

<script type="text/javascript">
var current_tab=document.getElementById('tab_default');
function tap_switch(obj)
{
   if(obj == _$('tab_default'))
   {
      _$('PatientsLikeMeActionList').style.display = "block";
      _$('FriendActionList').style.display = "none";
   }
   else
   {
       _$('PatientsLikeMeActionList').style.display = "none";
       _$('FriendActionList').style.display = "block";
   }
   current_tab.className="tap_style";
   obj.className="tap_current_style";
   current_tab=obj;
   
}

</script>


 <%csharp%>TempUrl = ModuleCtrl.Header4("myDiseaseInfo","我的疾病信息",false,false); <%/csharp%>
 {TempUrl}
 <div class="diseaseInfo">
  <%if PrData.DiseaseId>0%>
       <table>
    <tr><th>我的疾病</th>
    <%csharp%>TempUrl = "/Disease.aspx?id=" + PrData.DiseaseId; <%/csharp%>
    <td>
    <a href="{GetUrl(TempUrl)}">{DiseaseBLL.Instance.GetDiseaseInfo(PrData.DiseaseId).Name}</a>
    <%csharp%>TempUrl = "/DiseaseHistory/index.aspx";<%/csharp%>
    <a href="{GetUrl(TempUrl)}"><font style="font-size:12px;color:#808080;">修改</font></a>
  
    </td>&nbsp;<td></td></tr>
    <%csharp%> WeightHistoryInfo info = PatientBLL.Instance.GetCurrentWeight(PrData.Id); <%/csharp%>
    <tr><th>我的体重<%if info.DataValue>0 %><font style="font-size:12px;color:#808080;"> ({info.RecordDate.ToShortDateString()})</font><%/if%></th>
    <td>
    
    <%if info.DataValue==0%>您还没有添加，请点击右侧按钮添加！<%else%>
             {info.DataValue} {info.MeasurementUnits}
    <%/if%>
   
    </td>
    
    <%csharp%>TempUrl = "/WeightHistory/Index.aspx"; <%/csharp%>
    <td><a href="{GetUrl(TempUrl)}" class="selectall"><font color=Green>更新</font></a></td></tr>
    
    <tr><th>我的症状<font style="font-size:12px;color:#808080;"><%if MyCurrentSymptomList.Count!=0%>({dtLatestSymptomUpdateTime.ToShortDateString()})<%/if%></font></th><td>
<%if MyCurrentSymptomList.Count==0%>您还没有添加，请点击右侧按钮添加！<%else%>
        
        
    <%csharp%>int counter = 0; foreach(SymptomHistoryInfo item in MyCurrentSymptomList){ counter++; <%/csharp%> 
    <%csharp%>TempUrl = "/Symptom.aspx?id="+item.SymptomId; <%/csharp%>
    
    <%csharp%> if (counter % 6 == 0 && counter > 0) { <%/csharp%> <br /> <label id="idDummyLabel"; visible="true"; width="30px";></label><%csharp%>} <%/csharp%>
    
    <a href="{GetUrl(TempUrl)}" target="_blank">{item.SymptomName}</a>
    <%csharp%> if (item.DegreeValue == Constants.SYMPTOM_NONE) { <%/csharp%> <font style="font-size:12px;color:#008844;"> 
    <%csharp%>  } else if (item.DegreeValue == Constants.SYMPTOM_MILD)  { <%/csharp%> <font style="font-size:12px;color:#F1D827;"> 
    <%csharp%>  } else if (item.DegreeValue == Constants.SYMPTOM_MODERATE) { <%/csharp%> <font style="font-size:12px;color:#FF8A15;"> 
    <%csharp%>  } else { <%/csharp%> <font style="font-size:12px;color:#C60000;"> <%csharp%>}<%/csharp%>
    
    ({Constants.SymptomDegreeName[item.DegreeValue]})</font> &nbsp;&nbsp;
    <%csharp%>}<%/csharp%>
     

<%/if%>
    </td>
    
    <%csharp%>TempUrl = "/SymptomHistory/Index.aspx"; <%/csharp%>
    <td><a href="{GetUrl(TempUrl)}" class="selectall"><font color=Green>更新</font></a></td></tr>
    <tr><th>我的指标<font style="font-size:12px;color:#808080;"><%if MyCurrentIndicatorList.Count!=0%>({dtLatestIndicatorUpdateTime.ToShortDateString()})<%/if%></font></th>
    <td width="500px">
    <%if MyCurrentIndicatorList.Count==0%>您还没有添加，请点击右侧按钮添加！<%else%>
            
        <%csharp%>foreach(IndicatorHistoryInfo item in MyCurrentIndicatorList){<%/csharp%>
        {item.IndicatorName}
        <font style="font-size:12px;color:Red;">({item.DataValue}{item.MeasurementUnits})</font>&nbsp;&nbsp;
        <%csharp%>}<%/csharp%>
     <%/if%>   
    </td>
    <td>
    <%csharp%>TempUrl = "/IndicatorHistory/Index.aspx"; <%/csharp%>
    <a href="{GetUrl(TempUrl)}" class="selectall"><font color=Green>更新</font></a></td>
    </tr>
    <tr><th>我的治疗 <font style="font-size:12px;color:#808080;"><%if MyCurrentTreatmentList.Count!=0%>({dtLatestTreatmentUpdateTime.ToShortDateString()})<%/if%></font></th>
    <td>
    <%if MyCurrentTreatmentList.Count==0%>您还没有添加，请点击右侧按钮添加！<%else%>
       
            <%csharp%>foreach(TreatmentHistoryInfo item in MyCurrentTreatmentList){<%/csharp%>
            <%csharp%>TempUrl = "/Treatment.aspx?id="+item.TreatmentId; <%/csharp%>
            <a href="{GetUrl(TempUrl)}" target="_blank">{item.TreatmentName}</a>
            <font style="font-size:12px;color:Red;">({item.DataValue}{item.Unit})</font>&nbsp;&nbsp;
            <%csharp%>}<%/csharp%>
    <%/if%>
    </td>
    
    <%csharp%>TempUrl = "/TreatmentHistory/Index.aspx"; <%/csharp%>
    <td><a href="{GetUrl(TempUrl)}" class="selectall"><font color=Green>更新</font></a></td>
    </tr>
    </table>
   <%else%>
       <table>
   <tr>
   <th>我的疾病</th>
   <td><%csharp%>TempUrl = "/DiseaseHistory/Index.aspx"; <%/csharp%>
    您还没有记录您的患病信息，<a href="{this.GetUrl(TempUrl)}" style="color:Green;">现在开始记录</a>
   </td>
   </tr>
   <tr>
   <th>我的体重</th>
   <%csharp%>TempUrl = "/WeightHistory/Index.aspx"; <%/csharp%>
   <td><a href="{this.GetUrl(TempUrl)}">添加</a></td></tr>
      <tr>
   <th>我的症状</th>
   <%csharp%>TempUrl = "/SymptomHistory/Index.aspx"; <%/csharp%>
   <td><a href="{this.GetUrl(TempUrl)}">添加</a></td></tr>
      <tr>
   <th>我的指标</th>
   <%csharp%>TempUrl = "/IndicatorHistory/Index.aspx"; <%/csharp%>
   <td><a href="{this.GetUrl(TempUrl)}">添加</a></td></tr>
      <tr>
   <th>我的治疗</th>
   <%csharp%>TempUrl = "/TreatmentHistory/Index.aspx"; <%/csharp%>
   <td><a href="{this.GetUrl(TempUrl)}">添加</a></td></tr>
   </table>
   <%/if%>
 </div>   
  <%csharp%>TempUrl = ModuleCtrl.Footer("myDiseaseInfo"); <%/csharp%>
{TempUrl}



 <%csharp%>TempUrl = ModuleCtrl.Header4("patientStat","和我相似的病友",false,false); <%/csharp%>
 {TempUrl}
    <div class="diseaseInfo">
    <table>
    <tr><th>同症状的病友</th>
    <td>
    <%if PrData.Id<=0%>
    <%csharp%>TempUrl = "/DiseaseHistory/Index.aspx"; <%/csharp%>
    <a href="{this.GetUrl(TempUrl)}" style="color:Green;">请先填写您所患疾病</a>
    <%else%>
    <%csharp%>TempUrl = "/SymptomHistory/Index.aspx"; <%/csharp%>
       <%if MyCurrentSymptomList.Count==0%>您没有当前症状，请先<a href="{this.GetUrl(TempUrl)}" style="color:Green; font-size:14px;">添加症状</a><%else%>
       
            <%if SymptomStatArray.Length==0%>没有类似病友<%else%>
              <%csharp%>
                for(int i = 0;i< SymptomStatArray.Length;i++)
                {
                if(SymptomStatArray[i].SymptomId == 0) break;
                <%/csharp%>
                <%csharp%>TempUrl = "/PatientList.aspx"+"?dszid="+PrData.DiseaseId+"&symid="+SymptomStatArray[i].SymptomId; <%/csharp%>
                {SymptomStatArray[i].SymptomName}(<a href="{this.GetUrl(TempUrl)}"  target="_blank"><font color="red">{SymptomStatArray[i].PatientCount}</font></a>)&nbsp;

                <%csharp%>}<%/csharp%>
                 <font color="#808080">注：红色数字可点击！</font> 
             <%/if%>   
        <%/if%>     
    <%/if%> 
       
    </td></tr>
    <tr><th>同治疗的病友</th>
    <td>
     <%if PrData.Id<=0%>
    <%csharp%>TempUrl = "/DiseaseHistory/Index.aspx"; <%/csharp%>
    <a href="{this.GetUrl(TempUrl)}" style="color:Green;">请先填写您所患疾病</a>
    <%else%>
        <%csharp%>TempUrl = "/TreatmentHistory/Index.aspx"; <%/csharp%>
       <%if MyCurrentTreatmentList.Count==0%>您没有当前治疗，请先<a href="{this.GetUrl(TempUrl)}" style="color:Green; font-size:14px;">添加治疗</a><%else%>
             <%if TreatmentStatArray.Length==0%>没有类似病友<%else%>
                <%csharp%>
                for(int i = 0;i< TreatmentStatArray.Length;i++)
                {
                if(TreatmentStatArray[i].TreatmentId == 0) break;
                <%/csharp%>
                <%csharp%>TempUrl = "/PatientList.aspx"+"?dszid="+PrData.DiseaseId+"&trmid="+TreatmentStatArray[i].TreatmentId; <%/csharp%>
                {TreatmentStatArray[i].TreatmentName}(<a href="{this.GetUrl(TempUrl)}"  target="_blank"><font color="red">{TreatmentStatArray[i].PatientCount}</font></a>)&nbsp;

                <%csharp%>}<%/csharp%>
                <font color="#808080">注：红色数字可点击！</font> 
            <%/if%>    
        <%/if%>    
    <%/if%>
 
    </td>
    </tr>
    </table>
    
    </div>
   <%csharp%>TempUrl = ModuleCtrl.Footer("patientStat"); <%/csharp%>
{TempUrl}

 <%csharp%>TempUrl = ModuleCtrl.Header4("mybaseInfo","我的相关资讯",false,false); <%/csharp%>
 {TempUrl}
 <%if PrData.Id<=0%>
<%csharp%>TempUrl = "/DiseaseHistory/Index.aspx"; <%/csharp%>
<a href="{this.GetUrl(TempUrl)}" style="color:Green; font-size:14px;"><h1>请先填写您所患疾病</h1></a>
<%else%>
   <div class="diseaseInfo">
 
    <table class="forumInfo">

    <tr><th>精彩话题</th>
    <td>
    <%if HottestTopicsList.Count==0%>暂无<%else%>
            <%csharp%>
            foreach(TopicInfo item in HottestTopicsList)
            {
            <%/csharp%>  
            <%csharp%>TempUrl = "/BBS/Topic.aspx?gid="+forum.Id+"&tid="+item.Id; <%/csharp%>
            <li><a href="{this.GetUrl(TempUrl)}"><font color=Green>{item.Title}</font></a></li>
            <%csharp%>
            }
            <%/csharp%> 
   <%/if%>
    </td></tr>
        <tr><th>最新话题</th>
    <td>
    <%if LattestTopicsList.Count==0%>暂无<%else%>
            <%csharp%>
            foreach(TopicInfo item in LattestTopicsList)
            {
            <%/csharp%>  
            <%csharp%>TempUrl = "/BBS/Topic.aspx?gid="+forum.Id+"&tid="+item.Id; <%/csharp%>
            <li><a href="{this.GetUrl(TempUrl)}"><font color=Green>{item.Title}</font></a></li>
            <%csharp%>
            }
            <%/csharp%> 
   <%/if%>
    </td></tr>
  <tr><th>最新资讯</th>
    <td>
    <%if NewsList.Count==0%>暂无<%else%>
            <%csharp%>
            foreach(GroupNewsInfo item in NewsList)
            {
            <%/csharp%>  
            <%csharp%>TempUrl = "/BBS/News.aspx?gid="+forum.Id+"&id="+item.Id; <%/csharp%>
            <li><a href="{this.GetUrl(TempUrl)}"><font color=Green>{item.Title}</font></a></li>
            <%csharp%>
            }
            <%/csharp%> 
   <%/if%>
    </td></tr>
    </table>   
    </div>
    <%csharp%>TempUrl = "/BBS/Board.aspx?gid="+forum.Id; <%/csharp%>
   <p style="text-align:right; font-weight:bold; padding:5px">>>进入<a href="{this.GetUrl(TempUrl)}" style="color:Green; font-size:14px; text-decoration:underline;">{forum.GroupName}</a>大家庭</p>
 <%/if%> 
     <%csharp%>TempUrl = ModuleCtrl.Footer("mybaseInfo"); <%/csharp%>
{TempUrl}


</div>

<div class="col2">
 <%csharp%>TempUrl = ModuleCtrl.Header4("admin","管理中心",false,false); <%/csharp%>
{TempUrl}
<div class="admin">
<%csharp%>TempUrl = "/SymptomHistory/Index.aspx";<%/csharp%> 
     <li><a href="{GetUrl(TempUrl)}">更新病情</a></li>
     
<%csharp%>TempUrl = "/User/LogList.aspx";<%/csharp%> 
     <li><a href="{GetUrl(TempUrl)}">我的日志</a>&nbsp;
     
<%csharp%>TempUrl = "/User/LogAdd.aspx";<%/csharp%>      
     <a href="{GetUrl(TempUrl)}" style="color:Green; font-size:12px; text-decoration:underline;">写日志</a>
<%csharp%>TempUrl = "/User/PatientLogs.aspx";<%/csharp%>    
     &nbsp;<a href="{GetUrl(TempUrl)}" style="color:Green; font-size:12px; text-decoration:underline;">随便看看</a>
     
     </li>
 <%csharp%>TempUrl = "/User/FriendList.aspx";<%/csharp%> 
    <li><a href="{GetUrl(TempUrl)}">我的病友</a></li>
<%csharp%>TempUrl = "/User/ActionList.aspx?uid="+UserData.Id;<%/csharp%> 
     <li>
     <a href="{GetUrl(TempUrl)}">我的互动</a>
     <%csharp%>TempUrl = "/User/ActionSend.aspx";<%/csharp%>      
     <a href="{GetUrl(TempUrl)}" style="color:Green; font-size:12px; text-decoration:underline;">给病友们打个招呼</a>
     </li>
     <li>
       <%csharp%>TempUrl = "/SymptomHistory/Index.aspx";<%/csharp%> 
      <p style="text-align:right; font-weight:bold; padding:5px">>><a href="{this.GetUrl(TempUrl)}" style="color:Green; font-size:14px; text-decoration:underline;">管理中心</a></p>
    </li>
</div>
 
     
 <%csharp%>TempUrl = ModuleCtrl.Footer("admin"); <%/csharp%>
 {TempUrl}




  <%csharp%>TempUrl = ModuleCtrl.Header4("LattestVisitors","最近看过我的病友",false,false); <%/csharp%>
{TempUrl}

  <ul class="pictureliststyle">
<%csharp%>foreach(VisitRecordInfo item in LattestVisitRecordList){<%/csharp%>
<%csharp%> TempUrl="/Profile/Index.aspx?uid="+item.VisitUserId;<%/csharp%>
            
                <li>
                <a href="{GetUrl(TempUrl)}" class="user_img" target="_blank"><img src="{UserBLL.Instance.GetUserInfo(item.VisitUserId).Avatar}" width="45px" height="45px"/></a>
                <p><a href="{GetUrl(TempUrl)}" target="_blank">{item.VisitUserName}</a></p>
                <p style="font-size:11px; color:#808080;line-height:12pt;">{Utils.GetTimeSpanStr(item.VisitTime)}</p>
                </li>
             
           
                <%csharp%> } <%/csharp%>
                  
  </ul> 

 <%csharp%>TempUrl = ModuleCtrl.Footer("LattestVisitors"); <%/csharp%>
 {TempUrl}
 
 <%csharp%>TempUrl = ModuleCtrl.Header4("LogTopicHottest","最新的病友日记",true,false); <%/csharp%>
{TempUrl}

     <div class="toptopiclist">
        <%csharp%>
            foreach(LogTopicInfo item in HottestLogTopics) { 
                TempUrl = "/Profile/Log.aspx?uid=" + item.HostUserId + "&lid=" + item.Id;
        <%/csharp%>
        <li>
            <a href="{this.GetUrl(TempUrl)}" title="{item.Title}" target="_blank">
                <%csharp%>if(item.Title.Length > 14 ) item.Title = item.Title.Substring(0, 15) + ".." ;<%/csharp%>
                <%if item.Title.Length<=15%>{item.Title}<%else%>{item.Title.Substring(0,15)}...<%/if%>
                (<span style="color:#FF0000;">{item.ReplyCount}</span>回复)
            </a>
        </li>
        
        <%csharp%>}<%/csharp%>
    </div>
    <%csharp%>TempUrl = ModuleCtrl.Footer("LogTopicLattest"); <%/csharp%>
 {TempUrl}
<!-- LogTopicLattest -->		

 </div>
</div>

<script type="text/javascript">

var data_array=[];
var data_array2=[];
function loadActions()
{
  
  var aurl = "/Pages/alpha/Ajax/FriendActionListAjax.aspx";
  var aurl2 = "/Pages/alpha/Ajax/PatientsLikeMeActionList.aspx";
  var myAjax=new Ajax(aurl,
  {
     method:'get',
     onComplete:function()
     {

      data_array = this.response.text.split("@@@");      
      
      _$("FriendActionList").innerHTML=data_array[0];
      }
   }
   );
   var myAjax2=new Ajax(aurl2,
  {
     method:'get',
     onComplete:function()
     {

      data_array2 = this.response.text.split("@@@");      
      _$("PatientsLikeMeActionList").innerHTML=data_array2[0];
      }
   }
   );
   myAjax.request();
   myAjax2.request();
}  

function ViewFriendActionsPage(pageindex)
{
  _$("FriendActionList").innerHTML=data_array[pageindex-1];
} 
function ViewPatientsLikeMeActionsPage(pageindex)
{
  _$("PatientsLikeMeActionList").innerHTML=data_array2[pageindex-1];
} 
loadActions();
</script>

<script language="javascript">
function showPerBar()
{
    if (_$("percentBar") != null)
    {
        if (window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)     
        {
            _$("percentBar").style.width = _$("hiddenwidth").innerText;
                       
        }
        else
        {
            _$("percentBar").style.width = _$("hiddenwidth").textContent;
        }
    }

}
showPerBar();

</script>
<%template _footer%>
